import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';

class SettingListItem extends StatelessWidget {
  final VoidCallback onTap;
  final String title;
  final Border border;

  const SettingListItem({
    Key key,
    this.onTap,
    this.title,
    this.border =
        const Border(bottom: BorderSide(color: aceGrayColor, width: 0.5)),
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      constraints: BoxConstraints(
          minHeight: getDp(62), minWidth: MediaQuery.of(context).size.width),
      decoration: BoxDecoration(
        border: border,
      ),
      child: PressedOpacityButton(
        onPressed: onTap,
        color: Colors.white,
        disabledColor: Colors.white,
        padding: EdgeInsets.only(left: getDp(35), right: getDp(35)),
        child: Row(
          children: [
            Text(
              title,
              style: TextStyle(
                color: aceDarkGrayColor,
                fontSize: getSp(18),
                fontWeight: FontWeight.w700,
                height: 14 / 18,
              ),
            ),
            Spacer(),
            Image.asset(
              A.assetsImagesDashboardExpenseRight,
              width: getDp(10),
              height: getDp(14),
              color: aceDarkGrayColor,
              fit: BoxFit.contain,
            ),
          ],
        ),
      ),
    );
  }
}
